/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package dao;
import business.Clientes;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Halana Rebeca
 */
public class DaoCliente 
{
    private Connection conexao;

	private PreparedStatement stmt;

	private ResultSet tupla;
	private List<Clientes> ListaDeClientes= new ArrayList<Clientes>();

    public void CadastrarCliente(Clientes clint){

                            this.conexao=Fabrica.getConnection();

                                try{

                                    this.conexao.createStatement();
                                
                                    this.stmt=this.conexao.prepareStatement("INSERT INTO pessoa (nome) VALUES(?)");

                                    this.stmt.setString(1, clint.getNomeCliente());
                                    this.stmt.execute();
                                    this.stmt.close();
                                    this.conexao.close();


                                }

			catch(Exception e){

				System.out.println("Erro  "+e.toString());

			}

	}

    

    
}
